1. Technical Field
The present invention relates in general to a system and method for using a processor thread for software debugging. More particularly, the present invention relates to a system and method for initiating a debugger thread which invokes an operational thread whereby the debugger thread monitors the operational thread's functionality.
2. Description of the Related Art
Software code development proceeds through various stages before the code is released. A software developer writes the code, and then progresses through a series of code modifications using debug tools for detecting code errors.
A variety of debug tools are available for a software developer to use for debugging code. In many cases, a software developer uses a simulator to debug his code. A simulator is a software program that “simulates” the hardware that the code is targeted. The simulator loads the code, executes the code, and provides a user interface for a software developer to view the state of the code. However, a simulator typically does not execute the code “real-time” and, therefore, the simulator does not typically detect race conditions. A race condition is when two processes are running simultaneously and both are accessing a particular resource, such as a register.
One way for a software developer to detect race conditions is by loading his code on the targeted hardware. However, code in the development stages is typically unstable and is prone to crash a computer system. A challenge found, therefore, is debugging unstable code on its targeted hardware without seizing the hardware. A developer may spend more time rebooting his computer system than debugging his code. However, the only sure way that a developer knows how his code performs is by using the targeted hardware to execute the code. A challenge found, therefore, is using a code's targeted hardware to debug the code when the code in unstable.
What is needed, therefore, is a system and method for effectively debugging code using its targeted hardware and maintaining a robust environment.